package com.meizi.experimentcode.dsl;

import lombok.Data;

/**
 * @author Administration
 * @date 2022/3/10 - 11:21 - 星期四
 * @project lambda
 * @package com.meizi.experimentcode.dsl
 * @by 晨
 */
@Data
public class StockBuilder {

    private final TradeBuilder builder;

    private final Trade trade;


    private final Stock stock = new Stock();

    StockBuilder(TradeBuilder builder, Trade trade, String symbol) {
        this.builder = builder;
        this.trade = trade;
        stock.setSymbol(symbol);
    }

    public TradeBuilder on (String market) {
        stock.setMarket(market);
        trade.setStock(stock);
        return builder;
    }
}
